import Mock from 'mockjs'
import bannerList from './bannerList.json'
import floorList from './floorList.json'
import addressList from './addressList.json'


//造假接口，一个url对应一个回调
Mock.mock('/mock/getUserinfo',function() {
  return {
    code: 200,
    data: {
      username: '葛晨',
      age: 24
    },
    message: 'success'
  }
})

//准备bannerList假接口
Mock.mock('/mock/getBannerList',function () {
  return {
    code: 200,
    data: bannerList,
    message: 'success'
  }
})

//准备floorList假接口
Mock.mock('/mock/getFloorList',function () {
  return {
    code: 200,
    data: floorList,
    message: 'success'
  }
})

// 准备addressList地址列表
Mock.mock(`/mock/user/userAddress/auth/findUserAddressList`,function() {
  return {
    code: 200,
    data: addressList,  //  [地址列表]
    message: 'success'
  }
})